<template>
	<view class="item" :class="data['allotType'] === '2' ? 'invite' : ''">
		<text class="top-status">{{data['taskStatusCh']}}</text>
		<u-row class="row-1" gutter="16">
			<u-col span="5">
				<text class="title">{{data['orderTypeCh']}}</text>
				<text class="type">{{data['qualityGradeCh'].slice(0,3)}}</text>
			</u-col>
			<u-col span="7" text-align="right">
				<text class="time">{{data['requireTime'] | sliceTime}}前返稿</text>
			</u-col>
		</u-row>
		<u-row class="row-2" gutter="16">
			<u-col span="7">
				<text class="sub-title">{{data['sourceLanCh']}}-{{data['targetLanCh']}}</text>
			</u-col>
			<u-col span="5" text-align="right">
				<text class="price">{{data['currencyType'] | formatMoneyTypeEn}}<text>{{parseInt(data['unitPrice'])}}</text>千字</text>
			</u-col>
		</u-row>
		<u-row class="row-3" gutter="16">
			<u-col span="7">
				<text class="number">NO.{{data['taskId']}}</text>
			</u-col>
			<u-col span="5" text-align="right">
				<text class="workload">实际翻译约{{data['workLoad'] || data['ratioWords']}}字</text>
			</u-col>
		</u-row>
		<u-row gutter="16">
			<u-col span="12" class="progress">
				<u-line-progress
					active-color="#25E6E9" 
					:show-percent="false"
					striped-active
					height="16"
					:percent="data['transSchedule'] | progress"
				></u-line-progress>
				<text>{{data['transSchedule'] | progress}}%</text>
			</u-col>
		</u-row>
		<u-row gutter="16">
			<u-col span="12">
				<text class="sub-title">{{data['domainCh']}}</text>
			</u-col>
		</u-row>
		<u-row gutter="16" class="last">
			<u-col span="6">
				<text class="sub-title">结算时间：{{data['settleTime'] || data['jsTimeQuery'] || '--'}}</text>
			</u-col>
			<u-col span="6" text-align="right">
				<text v-if="data['taskStatus'] === '21'" class="reason">{{data['taskStatusCh']}}</text>
			</u-col>
		</u-row>
	</view>
	<!-- <view class="item" :class="data['allotType'] === '2' ? 'invite' : ''">
		<text class="top-status">退稿/终止</text>
		<u-row class="row-1" gutter="16">
			<u-col span="5">
				<text class="title">译前DTP</text>
			</u-col>
			<u-col span="7" text-align="right">
				<text class="time">2020-12-12 12:00前返稿</text>
			</u-col>
		</u-row>
		<u-row class="row-2" gutter="16">
			<u-col span="7">
				<text class="sub-title">中文简体-英文</text>
			</u-col>
			<u-col span="5" text-align="right">
				<text class="price">￥<text>200</text></text>
			</u-col>
		</u-row>
		<u-row class="row-3" gutter="16">
			<u-col span="7">
				<text class="number">NO.202012120001</text>
			</u-col>
		</u-row>
		<u-row gutter="16">
			<u-col span="12" class="progress">
				<u-line-progress
					active-color="#25E6E9" 
					:show-percent="false"
					striped-active
					height="16"
					:percent="70"
				></u-line-progress>
				<text>0%</text>
			</u-col>
		</u-row>
		<u-row gutter="16">
			<u-col span="12">
				<text class="sub-title">CAD 1张 3元/张</text>
				<text class="sub-title">CAD 2张 5元/张</text>
				<text class="sub-title">CAD 3张 8元/张</text>
			</u-col>
		</u-row>
		<u-row gutter="16" class="last">
			<u-col span="6">
				<text class="sub-title">结算时间：2020-12</text>
			</u-col>
			<u-col span="6" text-align="right">
				<text class="reason">译员退稿</text>
			</u-col>
		</u-row>
	</view> -->
</template>

<script>
	export default {
		props: ['data'],
		filters: {
			progress: (p) => {
				if(p && p !== 'null'){
					return p
				}else{
					return 0
				}
			}
		},
	}
</script>
